<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set var="ctx" value="${pageContext.request.contextPath}"></c:set>
<!DOCTYPE html>
<html>

<head>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">


<title>H+ 后台主题UI框架 - 数据表格</title>
<meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
<meta name="description"
	content="H+是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">

<link rel="shortcut icon" href="${ctx}/favicon.ico">
<link href="${ctx}/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
<link href="${ctx}/css/font-awesome.css?v=4.4.0" rel="stylesheet">

<!-- Data Tables -->
<link href="${ctx}/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">

<link href="${ctx}/css/animate.css" rel="stylesheet">
<link href="${ctx}/css/style.css?v=4.1.0" rel="stylesheet">
<!-- 全局js -->
<script src="${ctx}/js/jquery.min.js?v=2.1.4"></script>
<script src="${ctx}/js/bootstrap.min.js?v=3.3.6"></script>
<!-- 引入分页插件  -->
<script src="${ctx}/js/bootstrap-paginator.js"></script>



<script src="${ctx}/js/plugins/jeditable/jquery.jeditable.js"></script>

<!-- Data Tables -->
<script src="${ctx}/js/plugins/dataTables/jquery.dataTables.js"></script>
<script src="${ctx}/js/plugins/dataTables/dataTables.bootstrap.js"></script>

<!-- 引入日历插件js文件 -->
<script src="${ctx}/js/plugins/layer/laydate/laydate.js"></script>


<!-- 引入弹框插件 layer  -->
<script src="${ctx}/js/plugins/layer/layer.min.js"></script>


<!-- 引入 Jquery.validate.js 表单验证框架 -->
<script src="${ctx}/js/jquery.validate.min.js"></script>
<script src="${ctx}/js/messages_zh.min.js"></script>

<!-- 自定义js -->
<script src="${ctx}/js/content.js?v=1.0.0"></script>
</head>

<body class="gray-bg">

	<div class="col-sm-12">

		<div class="ibox float-e-margins">
			<div class="ibox-title">
				<h5>
					基本 <small>分类，查找</small>
				</h5>
				<div class="ibox-tools">
					<a class="collapse-link">
						<i class="fa fa-chevron-up"></i>
					</a>
					<a class="dropdown-toggle" data-toggle="dropdown" href="table_data_tables.html#">
						<i class="fa fa-wrench"></i>
					</a>
					<a class="close-link">
						<i class="fa fa-times"></i>
					</a>
				</div>
			</div>

			<div class="ibox-content">
				<div id="DataTables_Table_0_wrapper" class="dataTables_wrapper form-inline" role="grid">
					<div class="row">
						<div class="col-sm-6">
							<div class="dataTables_length" id="DataTables_Table_0_length">
								<label>
									每页
									<select id="pageSize" class="form-control input-sm">
										<option value="10" ${pageResult.pageSize eq 10 ?'selected':''}>10</option>
										<option value="25" ${pageResult.pageSize eq 25 ?'selected':''}>25</option>
										<option value="50" ${pageResult.pageSize eq 50 ?'selected':''}>50</option>
										<option value="100" ${pageResult.pageSize eq 100 ?'selected':''}>100</option>
									</select>
									条记录
								</label>
							</div>
						</div>
						<div class="col-sm-6">
							<div id="DataTables_Table_0_filter" class="dataTables_filter">
								<label>
									查找：
									<input class="form-control input-sm" placeholder="请输入关键字" id="search" type="search"
										value="${keyword}">
								</label>
							</div>
						</div>
					</div>
					<table class="table table-striped table-bordered table-hover dataTables-example dataTable"
						id="DataTables_Table_0" aria-describedby="DataTables_Table_0_info">
						<thead>
							<tr role="row">
								<th class="sorting_asc" tabindex="0">任务编号</th>
								<th class="sorting_asc" tabindex="0">标题</th>
								<th class="sorting_asc" tabindex="0">截止时间</th>
								<th class="sorting_asc" tabindex="0">执行人员</th>
								<th class="sorting_asc" tabindex="0">任务状态</th>
								<th class="sorting_asc" tabindex="0">紧急程度</th>
								<th class="sorting_asc" tabindex="0">操作</th>
							</tr>
						</thead>
						<tbody>

							<!-- 使用标签库 c:forEach 循环 集合${pageResult.dataList} -->
							<c:forEach items="${pageResult.dataList}" var="task">
								<tr id="tr_${task.id}" class="gradeA odd">
									<td class="">${task.task}</td>
									<td class="">${task.deadline}</td>
									<td class="">${task.principal}</td>
									<td class="">${task.taskstatus}</td>
									<td class="">${task.taskimportance}</td>
									<%-- <td class="" style="${user.delstatus eq 1 ?'color:green':'color:red'}">${user.delstatus eq 1 ?'在职':'离职'}</td> --%>
									<td class="">
										<!-- 使用onclick 触发删除函数 -->
										<button onclick="delSysUser(this,${task.id})" class="btn btn-danger">删除</button> <!-- 使用超链接 点击 让其弹出一个模态窗口 -->
										<a onclick="updateSysUser(this);" class="btn btn-info" data-toggle="modal"
											href="#modal-form" >修改</a>
									</td>
								</tr>
							</c:forEach>
						</tbody>

					</table>
					<div class="row">
						<div class="col-sm-6">
							<div class="dataTables_info">
								第${pageResult.currentPage} 页 共<span id="totalPage">${pageResult.totalPage}</span>页,总供 <span
									id="totalCount">${pageResult.totalCount}</span>条数据
							</div>
						</div>
						<div class="col-sm-6">
							<div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
								<ul id="pagination"></ul>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

	<!-- 模态对话框 -->
	<div id="modal-form" class="modal fade">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-body">
					<div class="row">
						<div class="col-sm-12">
							<h3 class="m-t-none m-b">修改用户</h3>


							<form class="form-horizontal" action="" method="post" id="regForm">
								<!-- 隐藏域:带上用户的id -->
								<input type="hidden" name="id">
								<div class="form-group" id="unameForm">
									<label class="col-sm-3 control-label">uname：</label>

									<div class="col-sm-7">
										<input id="uname" readonly="readonly" type="text" name="uname" placeholder="用户名"
											class="form-control" placeholder="请输入用户" required="required">
										<span class="help-block m-b-none" id="unameMsg"></span>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">pwd：</label>
									<div class="col-sm-7">
										<input type="password" id="pwd" name="pwd" placeholder="密码" class="form-control"
											placeholder="请输入密码">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">okpwd：</label>

									<div class="col-sm-7">
										<input type="password" name="okPwd" placeholder="密码" placeholder="确认密码"
											class="form-control">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">nickname：</label>

									<div class="col-sm-7">
										<input type="text" name="nickname" placeholder="请输入昵称" class="form-control">
									</div>
								</div>

								<div class="form-group">
									<label class="col-sm-3 control-label">qq：</label>
									<div class="col-sm-7">
										<input type="text" name="qq" class="form-control" placeholder="请输qq">

									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">email：</label>
									<div class="col-sm-7">
										<input type="email" name="email" class="form-control" placeholder="请输邮箱">

									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">phone：</label>
									<div class="col-sm-7">
										<input type="text" class="form-control" name="phone" placeholder="请输入电话">
									</div>
								</div>

								<div class="form-group">
									<label class="col-sm-3 control-label">regtime：</label>
									<div class="col-sm-7">
										<input id="regtime" name="regtime" class="laydate-icon form-control layer-date">
									</div>
								</div>


								<div class="form-group">
									<div class="col-sm-offset-3 col-sm-8">
										<button class="btn btn-sm btn-primary" id="update_btn" type="submit">修改用户</button>
										<!-- <button  class="btn btn-sm " type="reset">重置</button> -->
									</div>
								</div>
							</form>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>







</body>

</html>
